/*
 * This class is for compositePattern method，it implements SecurityCompositePatternComponent,inside the operations,
 * it ask for  SecurityCompositePatternComponent.
 * 
 * Composite can do some operation to its children.
 * 
 * public:
 * 		public String operation(SecurityCompositePatternComponent c) ;
 * 		public String add(SecurityCompositePatternComponent c);
 * 		public String remove(SecurityCompositePatternComponent c);
 * 		public String update(SecurityCompositePatternComponent c); 
 */
package compositePattern;

public class SecurityCompositePatternComposite implements SecurityCompositePatternComponent{
	
	//override the method that from the interface
	@Override
	public String operation(SecurityCompositePatternComponent c) {
		return "I am the composite of SecurityCompositePanttern";
	}
	
	//this methods is unique 
	public String add(SecurityCompositePatternComponent c) {
		return "Add a component";
	}

	public String remove(SecurityCompositePatternComponent c) {
		return "Remove a component";
	}

	public String update(SecurityCompositePatternComponent c) {
		return "Update a component";
	}
}
